package com.mida.bms.report.mapper;

import com.mida.bms.report.entity.DocReportRequisitionRelation;
import com.mida.bms.report.vo.DocReportListPage;
import com.mida.bms.report.vo.DocReportListVo;
import com.mida.bms.report.vo.DocReportRequisitionRelationVo;
import com.mida.bms.report.vo.ReportSearchRequest;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DocReportRequisitionRelationMapper {
    int deleteByPrimaryKey(Long stReportSvcSoid);

    int deleteByStReportSoid(Long stReportSoid);

    int insert(DocReportRequisitionRelation record);

    int insertSelective(DocReportRequisitionRelation record);

    DocReportRequisitionRelation selectByPrimaryKey(Long stReportSvcSoid);

    int updateByPrimaryKeySelective(DocReportRequisitionRelation record);

    int updateByPrimaryKey(DocReportRequisitionRelation record);

    DocReportRequisitionRelationVo selectByRequestSoid1(long requestSoid);

    int selectByNumberRequestSoid(Long requestSoid);

    List<DocReportRequisitionRelationVo> selectByRequestSoid(Long requestSoid);

    DocReportRequisitionRelationVo selectAccurateReport(@Param("requestSoid") Long requestSoid,
                                                        @Param("registrationFormSoid") Long registrationFormSoid,
                                                        @Param("operatorSoid") Long operatorSoid);

    int findPageCount(DocReportListPage docReportListPage);

    List<DocReportListVo> findReportPage(DocReportListPage docReportListPage);

    List<DocReportRequisitionRelationVo> selectByStReportSoid(Long stReportSoid);

    DocReportRequisitionRelationVo selectDoctorByRequestSoid(Long requestSoid);

    Integer selectByNumberOperatorSoid(Long operatorSoid);

    Integer selectByNumberRegistrationNo(String registrationNo);

    List<DocReportRequisitionRelationVo> selectByExam(Long operatorSoid);

    List<DocReportRequisitionRelationVo> selectByRegistrationNo(String registrationNo);

    List<Long> selecStReportSoidByRequestSoid(Long requestSoid);

    DocReportRequisitionRelationVo selectDoctorAndStatus(ReportSearchRequest reportSearchRequest);

    List<DocReportRequisitionRelationVo> selectDoctorAndStatusList(@Param("reportSearchRequestList") List<ReportSearchRequest> reportSearchRequestList);

    DocReportRequisitionRelation selectReport(@Param("requestSoid") Long requestSoid,
                                              @Param("operatorSoid") Long operatorSoid,
                         @Param("registrationFormSoid") Long registrationFormSoid);
}